package com.usian.article.feign;

import com.usian.model.behavior.pojos.ApBehaviorEntry;
import com.usian.model.behavior.pojos.ApLikesBehavior;
import com.usian.model.behavior.pojos.ApUnlikesBehavior;
import com.usian.model.user.pojos.ApUserFollow;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "behavior")
public interface BehaviorFeign {

    @GetMapping("/api/v1/behavior_entry/one")/*根据用户id查询实体*/
    public ApBehaviorEntry findApBehaviorEntry(@RequestParam("userId") Integer userId, @RequestParam(value = "equipmentId",required = false)Integer equipmentId);

    @GetMapping("/api/v1/likes_behavior/one")/*根据行为实体id和文章id查询点赞行为*/
    public ApLikesBehavior findLikeByArticleIdAndEntryId(@RequestParam("articleId")Long articleId, @RequestParam("entryId") Integer entryId, @RequestParam("type") Short type);

    @GetMapping("/api/v1/un_likes_behavior/one") /*根据行为实体id和文章id查询不喜欢行为*/
    public ApUnlikesBehavior findUnLikeByArticleIdAndEntryId(@RequestParam("entryId")Integer entryId, @RequestParam("articleId") Long articleId);


}
